]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Simplify sensitivity handling
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Feb 2020 13:24:51 +0000 (14:24 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 1 Mar 2020 01:21:04 +0000 (01:21 +0000)
We only call _updateSensitivity() to make elements sensitive, and
nothing ever touches the sensitivity of the switch-user button; so
just call the corresponding authPrompt method directly, which is the
only bit that has an actual effect.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1029

js/ui/unlockDialog.js

index 14bd972d6a5a4e29aad6d753e813e1d16a16861a..43d3bdbdb0f7d2f63cf644c444dae672fe9baae7 100644 (file)
@@ -666,7 +666,7 @@ var UnlockDialog = GObject.registerClass({
         this._promptBox.add_child(this._authPrompt);
 
         this._authPrompt.reset();
-        this._updateSensitivity(true);
+        this._authPrompt.updateSensitivity(true);
     }
 
     _maybeDestroyAuthPrompt() {
@@ -682,13 +682,6 @@ var UnlockDialog = GObject.registerClass({
         }
     }
 
-    _updateSensitivity(sensitive) {
-        this._authPrompt.updateSensitivity(sensitive);
-
-        this._otherUserButton.reactive = sensitive;
-        this._otherUserButton.can_focus = sensitive;
-    }
-
     _showClock() {
         if (this._activePage === this._clock)
             return;